#ifndef _IMDB_H
#define _IMDB_H
#include <string>
#include <iostream>
#include <jsoncpp/json/json.h>
#include "myDB.h"

using namespace std;

class imDB
{
	public:
		imDB();
		~imDB();
                int join(string nickname,string pwd);
		void reInitDB(string host,string user,string pwd,string dbname);
                bool regName(string nickname,string pwd);
		void rePwd(string nickname,string oldpwd,string pwd);
                void creatJoinTable();
                bool getUserArry(Json::Value &arry);
                bool getOrganArry(Json::Value &arry);
                void reOrgan(string nickname,string organ);
                void reName(string nickname,string name);
                void reMood(string nickname,string mood);
                void reMobileNumber(string nickname,string mobile);
                void reGroups(string nickname,string groups);
                void reVerified(string nickname,bool verified);
                void delNickname(string nickname);
                bool getUserInfo(string nickname,Json::Value &arry);
	private:
		MyDB m_db;
protected:

};

#endif
